package org.openea.eap.module.system.controller.admin.health;


import io.swagger.v3.oas.annotations.Operation;
import org.openea.eap.framework.common.pojo.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import static org.openea.eap.framework.common.pojo.CommonResult.success;

@RestController
public class HealthController {

    @GetMapping("/heartbeat")
    @Operation(summary = "检查心跳")
    public CommonResult<String> checkHeartbeat(HttpServletRequest request, HttpServletResponse response) {
        // token过期会被拦截返回401
        return success("ok");
    }
}
